package com.scott.ch060;

import redis.clients.jedis.Jedis;

/**
 * @author 黄后林
 * @version 1.0
 * @note Redis Hash
 * @date 2022-03-25 14:30:17
 */
public class RedisHashDemo1 {

    public static void main(String[] args) {
        Jedis jedis = new Jedis("192.168.88.129", 6379);
        jedis.hset("teacher:10010","name","scott");
        jedis.hset("teacher:10010","age","39");
        jedis.hset("teacher:10010","salary","29500");
        String salary = jedis.hget("teacher:10010", "salary");
        System.out.println("salary="+salary);
        jedis.close();
    }
}
